﻿using System;
using System.Collections.Generic;
using System.Text;
using Silvermoon.UI;
using Silvermoon.Windows;

namespace Silvermoon.Controls
{
    public static class ItemStateManagers
    {
        public static readonly VisualStateManager ItemManager2 = new VisualStateManager(
            Control.OpacityDisabledEnabledGroup,
            new VisualStateGroup(
                new VisualState(VState.Normal, 500),
                new VisualState(VState.Pressed,
                new ScaleTransition { To = new ScaleTransform(0.94f, 0.94f, 1f), Duration = 2 }
                )
             )
        );
        public static readonly VisualStateManager ItemManager = new VisualStateManager(
            Control.OpacityDisabledEnabledGroup,
            new VisualStateGroup(
                new VisualState(VState.Unselected, 10),
                new VisualState(VState.Selected,
                    new ColorTransition { Property = Control.TextColorProperty, Duration = 100, To = PhoneColors.Accent })
                ),
            new VisualStateGroup(
                new VisualState(VState.Normal, 500),
                new VisualState(VState.Pressed,
                new ScaleTransition { To = new ScaleTransform(0.94f, 0.94f, 1f), Duration = 2 }
                )
             )
        );

        public static readonly VisualStateManager ItemManagerWhiteSelection = new VisualStateManager(
                Control.OpacityDisabledEnabledGroup,
                new VisualStateGroup(
                    new VisualState(VState.Unselected, 10),
                    new VisualState(VState.Selected,
                        new ColorTransition { Property = Control.TextColorProperty, Duration = 100, To = PhoneColors.White })
                    ),
                new VisualStateGroup(
                    new VisualState(VState.Normal, 500),
                    new VisualState(VState.Pressed,
                    new ScaleTransition { To = new ScaleTransform(0.94f, 0.94f, 1f), Duration = 2 }
                    )
                 )
            );

        public static readonly VisualStateManager HighlightItemManager = new VisualStateManager(
            Control.OpacityDisabledEnabledGroup,
            new VisualStateGroup(
                new VisualState(VState.Unselected, 10),
                new VisualState(VState.Selected,
                    new ColorTransition { Property = Control.ColorProperty, Duration = 200, To = PhoneColors.Accent },
                    new ColorTransition { Property = Control.TextColorProperty, Duration = 10, To = PhoneColors.White })
                ),
            new VisualStateGroup(
                new VisualState(VState.Normal, 500),
                new VisualState(VState.Pressed,
            //                    new FloatTransition { Property = YRotationProperty, To = -3f, Duration = 5 },
                new ScaleTransition { To = new ScaleTransform(0.94f, 0.94f, 1f), Duration = 2 }
                )
             )
        );

        public static readonly VisualStateManager PickerItem = new VisualStateManager(
            Control.OpacityDisabledEnabledGroup,
            new VisualStateGroup(
                new VisualState(VState.Unselected, 10),
                new VisualState(VState.Selected,
                    new ColorTransition { Property = Control.ColorProperty, Duration = 200, To = PhoneColors.MediumDark },
                    new IntTransition { Property = Control.OpacityProperty, Duration = 200, To = 255 }
                ))
        );

        public static readonly VisualStateManager MenuItemManager = new VisualStateManager(
             Control.OpacityDisabledEnabledGroup,
             new VisualStateGroup(
                 new VisualState(VState.Normal, 5),
                 new VisualState(VState.Pressed,
                     new ColorTransition { Property = Control.ColorProperty, Duration = 5, To = PhoneColors.Accent },
                     new ColorTransition { Property = Control.TextColorProperty, Duration = 5, To = PhoneColors.White })
              )
 );



    }
}
